"""循环"""
names = ['zhangsan', 'lisi', 'wangwu']
for name in names:
    print(name)

sum = 0
for i in [1, 2, 34,5, 6, 7, 8, 9, 10]:
    sum += i
print(sum)

# Python提供一个range()函数，可以生成一个整数序列
sum = 0
for x in range(101): # range(101)就可以生成0-100的整数序列
    sum += x
print(sum)

sum = 0
n = 99
while n > 0:
    sum += n
    n = n - 2
print(sum)

L = ['Bart', 'Lisa', 'Adam']
for l in L:
    print('Hello %s !' % l)
